/*
 *
Base(int)
Member(int)
Derived()

Base(int)
Member()
Derived(int, int)

~Derived()
~Member()
~Base()
~Derived()
~Member()
~Base()

 */

#include <iostream>
using namespace std;
class Member{
	private:
		int m_k; 
	public:
		Member(){
			cout << "Member()" << endl;
			m_k = 0;
		}
		Member(int k){
			cout << "Member(int)" << endl;
			m_k = k;
		}
		~Member(){
			cout << "~Member()"<< endl;
		}
};
class Base{
	private:
		int m_i;
	public:
		Base(){
			cout << "Base()" << endl;
			m_i = 0;
		}
		Base(int i){
			cout << "Base(int)" << endl;
			m_i = i;
		}
		~Base(){
			cout << "~Base()"<< endl;
		}
};
class Derived:public Base{
	private:
		int m_j;
		Member m_m;
	public:
		Derived():Base(100),m_m(200){
			cout << "Derived()" << endl;
		}
		Derived(int i, int j):Base(i){
			cout << "Derived(int, int)" << endl;
			m_j = j;
		}
		~Derived(){
			cout << "~Derived()"<< endl;
		}
};
int main(void){
	Derived d1;
	cout << endl;
	Derived d2(1,2);
	cout << endl;
	return 0;
}
